
package umaine.ece471.cookbook;

public class Recipe {
	public String recipe_recipename;
	public String recipe_creator;
	
	public String recipe_ingredient1;
	public String recipe_unit1;
	public String recipe_size1;
	
	public String recipe_ingredient2;
	public String recipe_unit2;
	public String recipe_size2;
	
	public String recipe_ingredient3;
	public String recipe_unit3;
	public String recipe_size3;
	
	public String recipe_ingredient4;
	public String recipe_unit4;
	public String recipe_size4;
	
	public String recipe_ingredient5;
	public String recipe_unit5;
	public String recipe_size5;
	
	public String recipe_ingredient6;
	public String recipe_unit6;
	public String recipe_size6;
	
	public String recipe_ingredient7;
	public String recipe_unit7;
	public String recipe_size7;
	
	public String recipe_ingredient8;
	public String recipe_unit8;
	public String recipe_size8;

	public String recipe_ingredient9;
	public String recipe_unit9;
	public String recipe_size9;
	
	public String recipe_instructions;
	
	public String recipe_prepTime;
	public String recipe_cookTime;
	public int	recipe_rating;
	
	public Recipe(String dataString){
			String splits[] = dataString.split(";");
			String nameSplitter[] = splits[0].split("_");
			
			
			recipe_recipename = nameSplitter[0];
			recipe_creator = nameSplitter[1];
			
			recipe_ingredient1 = splits[1];
			recipe_unit1 = splits[2];
			recipe_size1 = splits[3];
			
			recipe_ingredient2 = splits[4];
			recipe_unit2 = splits[5];
			recipe_size2 = splits[6];
			
			recipe_ingredient3 = splits[7];
			recipe_unit3 = splits[8];
			recipe_size3 = splits[9];
			
			recipe_ingredient4 = splits[10];
			recipe_unit4 = splits[11];
			recipe_size4 = splits[12];
			
			recipe_ingredient5 = splits[13];
			recipe_unit5 = splits[14];
			recipe_size5 = splits[15];
			
			recipe_ingredient6 = splits[16];
			recipe_unit6 = splits[17];
			recipe_size6 = splits[18];
			
			recipe_ingredient7 = splits[19];
			recipe_unit7 = splits[20];
			recipe_size7 = splits[21];
			
			recipe_ingredient8 = splits[22];
			recipe_unit8 = splits[23];
			recipe_size8 = splits[24];
			
			recipe_ingredient9 = splits[25];
			recipe_unit9 = splits[26];
			recipe_size9 = splits[27];
			
			recipe_instructions = splits[28];
			recipe_prepTime = splits[29];//"10 mins";
			recipe_cookTime = splits[30];//"25 mins";
			recipe_rating = 3;							//NEEDS TO BE CHANGED ONCE WE FIGURE OUT RATING
	}
}
